num = input()
re = str(hex(int(num,10)))[2:]
re2 = ""
for r in re:
    if 'a'<=r<='z':
        r = r.upper()

    re2+=r

print("{}".format(re2))
